From 6c8c37abbb641f3959ab45a5de4adb2aeb36f653 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Thu, 19 Mar 2015 15:58:00 +0100 Subject: [PATCH] wayland: Silence warnings on clipboard data sending cancellation During copy/paste, it may be common that we receive several property changes around the selection atom, this results in warnings when cancelling the previous write attempt. We already honor the last request properly, so we should just cancel silently. --- gdk/wayland/gdkselection-wayland.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gdk/wayland/gdkselection-wayland.c b/gdk/wayland/gdkselection-wayland.c index 043ca7d6df..12a2d30f7b 100644 --- a/gdk/wayland/gdkselection-wayland.c +++ b/gdk/wayland/gdkselection-wayland.c @@ -416,9 +416,11 @@ async_write_data_cb (GObject *object, res, &error); if (error) { - g_warning ("Error writing selection data: %s", error->message); - g_error_free (error); + if (error->domain != G_IO_ERROR || + error->code != G_IO_ERROR_CANCELLED) + g_warning ("Error writing selection data: %s", error->message); + g_error_free (error); async_write_data_free (write_data); return; } -- 2.30.2